import React from "react";
import Header from "./Header";
import { BrowserRouter } from "react-router-dom";
import Content from "./Content";
import AuthProvider from "./AuthProvider";

const App = () => {
    return (
        // 路由包裹所有的组件
        <AuthProvider>
            <BrowserRouter>
                <Header />
                <Content />
            </BrowserRouter>
        </AuthProvider>
    );
};

export default App;

{
    /* 只会显示成功的第一项 */
}
{
    /* <Link to="/">首页</Link>
<Link to="/new">新手入门</Link>
<Link to="/api">API</Link>
<Link to="/login">登录</Link> */
}

{
    /* 匹配成功，挂载组件，exact：严格匹配 */
}
